package com.sub.project.info.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sub.project.info.prototype.Prototype;
import com.sub.project.info.vo.RestVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sub.framework.aspectj.lang.annotation.Excel;

import java.util.Date;

/**
 * 【用户的技能】对象 user_technology
 * 
 * @author ruoyi
 * @date 2020-01-07
 */
@TableName("tb_user_technology")
public class UserTechnology implements Prototype
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 技能名称 */
    @Excel(name = "技能名称")
    private String name;

    /** 技术简介 */
    @Excel(name = "技术简介")
    private String content;

    /** 熟练度（1、入门  2 、初级 3、中级 4、高级  5、精通） */
    @Excel(name = "熟练度", readConverterExp = "1=入门,2=初级,3=中级,4=高级,5=精通")
    private Long proficiency;

    /** 开始学习时间 */
    @Excel(name = "开始学习时间", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date startTime;

    /** 创建时间 */
    private Date createTime;

    /** $column.columnComment */
    private String createBy;

    /** 创建人id */
    @Excel(name = "创建人id")
    private String createByUserId;

    /** 修改人 */
    private String updateBy;

    /** 修改人id */
    @Excel(name = "修改人id")
    private String updateByUserId;

    /** 修改时间 */
    private Date updateTime;

    /** 用户id */
    @Excel(name = "用户id")
    private String userId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setProficiency(Long proficiency) 
    {
        this.proficiency = proficiency;
    }

    public Long getProficiency() 
    {
        return proficiency;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setCreateTime(Date createTime) 
    {
        this.createTime = createTime;
    }

    public Date getCreateTime() 
    {
        return createTime;
    }
    public void setCreateBy(String createBy) 
    {
        this.createBy = createBy;
    }

    public String getCreateBy() 
    {
        return createBy;
    }
    public void setCreateByUserId(String createByUserId) 
    {
        this.createByUserId = createByUserId;
    }

    public String getCreateByUserId() 
    {
        return createByUserId;
    }
    public void setUpdateBy(String updateBy) 
    {
        this.updateBy = updateBy;
    }

    public String getUpdateBy() 
    {
        return updateBy;
    }
    public void setUpdateByUserId(String updateByUserId) 
    {
        this.updateByUserId = updateByUserId;
    }

    public String getUpdateByUserId() 
    {
        return updateByUserId;
    }
    public void setUpdateTime(Date updateTime) 
    {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() 
    {
        return updateTime;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("content", getContent())
            .append("proficiency", getProficiency())
            .append("startTime", getStartTime())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("createByUserId", getCreateByUserId())
            .append("updateBy", getUpdateBy())
            .append("updateByUserId", getUpdateByUserId())
            .append("updateTime", getUpdateTime())
            .append("userId", getUserId())
            .toString();
    }

    @Override
    public Prototype clone() {
        RestVo restVo = new RestVo();
        restVo.setContent(this.content);
        restVo.setId(this.id);
        restVo.setName(this.name);
        restVo.setRemarks(String.valueOf(this.proficiency));
        restVo.setStartTime(this.startTime);
        return restVo;
    }
}
